package com.hammer.myapplication;

import android.os.Parcel;

import com.walixiwa.floatingsearchview.suggestions.model.SearchSuggestion;


public class HistorySuggestion implements SearchSuggestion {
    private String keyWords;

    public HistorySuggestion(String keyWords) {
        this.keyWords = keyWords;
    }

    public HistorySuggestion(Parcel source) {
        this.keyWords = source.readString();
    }

    public String getKeyWords() {
        return keyWords;
    }

    public void setKeyWords(String keyWords) {
        this.keyWords = keyWords;
    }

    public static final Creator<HistorySuggestion> CREATOR = new Creator<HistorySuggestion>() {
        @Override
        public HistorySuggestion createFromParcel(Parcel in) {
            return new HistorySuggestion(in);
        }

        @Override
        public HistorySuggestion[] newArray(int size) {
            return new HistorySuggestion[size];
        }
    };

    @Override
    public String getBody() {
        return keyWords;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.keyWords);
    }
}
